<!--
名称: 弹出框组件
作者: huangdi_cd
日期: 2021/4/15
说明: 用于快速统一构建弹窗页面
-->
<template>
    <el-dialog
        title="提示"
        :visible.sync="dialogVisible"
        width="30%"
        >
        <span v-show="spanText">{{ tipInfo }}</span>
        <el-input v-show="inputText" type="textarea" v-model ='textInfo'></el-input>
        <el-container style="margin-top: 5px">
            <AButton style="margin-left: 200px" button-name="取消" @click="dialogVisible = false"></AButton>
            <AButton style="margin-left: 10px" button-name="确认" @click="ok"></AButton>
        </el-container>

    </el-dialog>
</template>

<script>
    export default {
        name: 'ATipInfoCom',
        props: {
            tipInfo: {
                type: String,
                default: '是否确认?'
            },
            dialogVisible: {
                type: Boolean,
                default: false
            },
            spanText: {
                type: Boolean,
                default: false
            },
            inputText: {
                type: Boolean,
                default: false
            }

        },
        data () {
            return {
                textInfo: ''
            }
        },
        methods: {
            ok () {
                this.$emit('ok', this.textInfo)
                this.dialogVisible = false
            }
        }
    }
</script>

<style scoped>

</style>
